package com.cqeec.myblog.dao;

import java.sql.SQLException;
import java.util.List;

import com.cqeec.myblog.model.Article;

/**
 * 针对文章表进行读写数据的接口。
 * 
 * @author TLF。
 *
 */
public interface ArticleDao {
	/**
	 * 查询所有文章。
	 * 
	 * @return 所有文章对象列表。
	 */
	public List<Article> select();

	public void insert(Article article) throws ClassNotFoundException, SQLException;

	public List<Article> findByType(String type) throws ClassNotFoundException, SQLException;

	public List<Article> findByPage(int pageSize, int pageNumber) throws ClassNotFoundException, SQLException;

	public int count() throws ClassNotFoundException, SQLException;

	public int count(String type) throws ClassNotFoundException, SQLException;

	public List<Article> findByPage(int pageSize, int pageNumber, String type)
			throws ClassNotFoundException, SQLException;

	public Article findById(String id) throws ClassNotFoundException, SQLException;
}
